package cn.mall.base.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author ：xc
 * @description：TODO
 * @date ：2023/12/5 11:26
 */
public class CheckUrlUtil {


    /**
     * 获取taskid
     * @param url
     * @return
     * @throws Exception
     */
    public static String invertUrl(String url)  throws Exception{

        String regex = "\\d+"; // 匹配一个或多个数字
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(url);
        if (matcher.find()) {
            return matcher.group();
        }
            return null;
    }


}
